Sarfaraz Khan's maiden hundred and Rishabh Pant's innings offered hope for India, but their dismissals led to a swift decline for the hosts